package com.k.base.jdk.reflect;

import java.lang.reflect.Method;

public class ReflectOne {
    public static void main(String[] args) {
        String className = "com.k.base.jdk.reflect.domain.Order";
        try {
            Class<?> cls = Class.forName(className);
            Object instance = cls.newInstance();
            Method method = cls.getMethod("getId");
            Object ret = method.invoke(instance);
            System.out.println(ret);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
